﻿@namespace AntBlazor
@inherits AntButtonBase

<CascadingValue Value="this">
    <button class="@ClassMapper.Class" style="@Style" @attributes="Attributes" Id="@Id" @onclick="OnClick">
        @if (loading)
        {
            <AntIcon type="loading"></AntIcon>
        }
        @if (!string.IsNullOrEmpty(icon))
        {
            <AntIcon type="@icon" Style="@iconStyle"></AntIcon>
        }

        @ChildContent
    </button>
</CascadingValue>
